<template>
  <div class="singer-item" @click="$router.push(`/music/singerDetail/${props.singerDetail.id}`)">
    <div class="singer-item_avatar">
      <img :src="`${props.singerDetail.img1v1Url}?param=100y100`" alt="" />
    </div>
    <div class="singer-item_info">
      <div class="singer-item_info_name">{{ props.singerDetail.name }}</div>
      <span v-if="props.singerDetail.accountId">
        <van-icon name="user-circle-o" style="color: #dc143c" />
        已入驻
      </span>
    </div>
  </div>
</template>

<script setup lang="ts">
import type { ISingerItem } from "@/types/music/singerType";

const props = defineProps<{
  color: string;
  singerDetail: ISingerItem;
}>();
</script>

<style scoped lang="scss">
.singer-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
  &_avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 10px;
    overflow: hidden;
    img {
      width: 100%;
      height: 100%;
    }
  }
  &_info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: v-bind("props.color");
    &_name {
      font-size: 18px;
    }
    span {
      font-size: 14px;
    }
  }
}
</style>
